import { Controller, Get, Render, Request } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get()
  @Render('default/index')
  index(@Request() req) {
    req.session.username = 'Wick';
    return {
      name: '12',
    };
  }

  @Get('users')
  @Render('default/users')
  users() {
    return {
      name: '用户中心',
    };
  }
}
